package com.tk.exam.dao;

import com.github.pagehelper.PageInfo;
import com.tk.exam.domain.TkToken;
import com.tk.exam.domain.TkTokenExample;
import com.tk.exam.mapper.TkTokenMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class TkTokenDao {

    @Autowired
    private TkTokenMapper tkTokenMapper;

    public PageInfo<TkToken> selectAclUsersWithPage() {
        TkTokenExample example = new TkTokenExample();
        TkTokenExample.Criteria criteria = example.createCriteria();
        byte isExpired = 1;
        criteria.andIsExpiredEqualTo(isExpired);
        return new PageInfo<TkToken>(this.tkTokenMapper.selectByExample(example));
    }
}
